<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Dangling pointer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Dangling_pointer"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Dangling_pointer rootpage-Dangling_pointer skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Dangling pointer</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p><b>Dangling pointers</b> and <b>wild pointers</b> in <a href="Computer_programming" title="Computer programming">computer programming</a> are <a href="Data_pointer" class="mw-redirect" title="Data pointer">pointers</a> that do not point to a valid object of the appropriate type. These are special cases of <a href="Memory_safety" title="Memory safety">memory safety</a> violations. More generally, <b>dangling references</b> and <b>wild references</b> are <a href="Reference_(computer_science)" title="Reference (computer science)">references</a> that do not resolve to a valid destination.
</p><p>Dangling pointers arise during <a href="Object_destruction" class="mw-redirect" title="Object destruction">object destruction</a>, when an object that is pointed to by a given pointer is deleted or deallocated, without modifying the value of that said pointer, so that the pointer still points to the memory location of the deallocated memory. The system may reallocate the previously freed memory, and if the program then <a href="Dereference_operator" class="mw-redirect" title="Dereference operator">dereferences</a> the (now) dangling pointer, <i><a href="Undefined_behavior" title="Undefined behavior">unpredictable behavior</a> may result</i>, as the memory may now contain completely different data. If the program writes to memory referenced by a dangling pointer, a silent corruption of unrelated data may result, leading to subtle <a href="Software_bug" title="Software bug">bugs</a> that can be extremely difficult to find. If the memory has been reallocated to another process, then attempting to dereference the dangling pointer can cause <a href="Segmentation_fault" title="Segmentation fault">segmentation faults</a> (UNIX, Linux) or <a href="General_protection_fault" title="General protection fault">general protection faults</a> (Windows). If the program has sufficient privileges to allow it to overwrite the bookkeeping data used by the kernel's memory allocator, the corruption can cause system instabilities. In <a href="Object-oriented_language" class="mw-redirect" title="Object-oriented language">object-oriented languages</a> with <a href="Garbage_collection_(computer_science)" title="Garbage collection (computer science)">garbage collection</a>, dangling references are prevented by only destroying objects that are unreachable, meaning they do not have any incoming pointers; this is ensured either by tracing or <a href="Reference_counting" title="Reference counting">reference counting</a>. However, a <a href="Finalizer" title="Finalizer">finalizer</a> may create new references to an object, requiring <a href="Object_resurrection" title="Object resurrection">object resurrection</a> to prevent a dangling reference.
</p><p>Wild pointers, also called uninitialized pointers, arise when a pointer is used prior to initialization to some known state, which is possible in some programming languages. They show the same erratic behavior as dangling pointers, though they are less likely to stay undetected because many compilers will raise a warning at compile time if declared variables are accessed before being initialized.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Cause_of_dangling_pointers">Cause of dangling pointers</h2></div>
<p>In many languages (e.g., the <a href="C_(programming_language)" title="C (programming language)">C programming language</a>) deleting an object from memory explicitly or by destroying the <a href="Stack_frame" class="mw-redirect" title="Stack frame">stack frame</a> on return does not alter associated pointers. The pointer still points to the same location in memory even though that location may now be used for other purposes.
</p><p>A straightforward example is shown below:
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="p">{</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">dp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span>
<span class="w"> </span><span class="cm">/* ... */</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">c</span><span class="p">;</span>
<span class="w"> </span><span class="n">dp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&</span><span class="n">c</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span><span class="w"> </span>
<span class="w"> </span><span class="cm">/* c falls out of scope */</span>
<span class="w"> </span><span class="cm">/* dp is now a dangling pointer */</span>
<span class="p">}</span>
</pre></div>
<p>If the operating system is able to detect run-time references to <a href="Null_pointer" title="Null pointer">null pointers</a>, a solution to the above is to assign 0 (null) to dp immediately before the inner block is exited. Another solution would be to somehow guarantee dp is not used again without further initialization.
</p><p>Another frequent source of dangling pointers is a jumbled combination of <code>malloc()</code> and <code>free()</code> library calls: a pointer becomes dangling when the block of memory it points to is freed. As with the previous example one way to avoid this is to make sure to reset the pointer to null after freeing its reference—as demonstrated below.
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span>
<span class="kt">void</span><span class="w"> </span><span class="nf">func</span><span class="p">()</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">dp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">malloc</span><span class="p">(</span><span class="n">A_CONST</span><span class="p">);</span>
<span class="w"> </span><span class="cm">/* ... */</span>
<span class="w"> </span><span class="n">free</span><span class="p">(</span><span class="n">dp</span><span class="p">);</span><span class="w"> </span><span class="cm">/* dp now becomes a dangling pointer */</span>
<span class="w"> </span><span class="n">dp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="cm">/* dp is no longer dangling */</span>
<span class="w"> </span><span class="cm">/* ... */</span>
<span class="p">}</span>
</pre></div>
<p>An all too common misstep is returning addresses of a stack-allocated local variable: once a called function returns, the space for these variables gets deallocated and technically they have "garbage values".
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="nf">func</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1234</span><span class="p">;</span>
<span class="w"> </span><span class="cm">/* ... */</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="o">&</span><span class="n">num</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Attempts to read from the pointer may still return the correct value (1234) for a while after calling <code>func</code>, but any functions called thereafter may overwrite the stack storage allocated for <code>num</code> with other values and the pointer would no longer work correctly. If a pointer to <code>num</code> must be returned, <code>num</code> must have scope beyond the function—it might be declared as <code><a href="Static_variable" title="Static variable">static</a></code>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Manual_deallocation_without_dangling_reference">Manual deallocation without dangling reference</h2></div>
<p>Antoni Kreczmar (1945–1996) has created a complete object management system which is free of dangling reference phenomenon.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> A similar approach was proposed by Fisher and LeBlanc<sup id="cite_ref-Fisher_3-0" class="reference"><a href="#cite_note-Fisher-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> under the name <i><a href="Locks-and-keys_(computing)" title="Locks-and-keys (computing)">Locks-and-keys</a></i>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Cause_of_wild_pointers">Cause of wild pointers</h2></div>
<p>Wild pointers are created by omitting necessary initialization prior to first use. Thus, strictly speaking, every pointer in programming languages which do not enforce initialization begins as a wild pointer.
</p><p>This most often occurs due to jumping over the initialization, not by omitting it. Most compilers are able to warn about this.
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="kt">int</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">dp</span><span class="p">;</span><span class="w"> </span><span class="cm">/* dp is a wild pointer */</span>
<span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">scp</span><span class="p">;</span><span class="w"> </span><span class="cm">/* scp is not a wild pointer:</span>
<span class="cm"> * static variables are initialized to 0</span>
<span class="cm"> * at start and retain their values from</span>
<span class="cm"> * the last call afterwards.</span>
<span class="cm"> * Using this feature may be considered bad</span>
<span class="cm"> * style if not commented */</span>
<span class="p">}</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Security_holes_involving_dangling_pointers">Security holes involving dangling pointers</h2></div>
<p>
</p><p>Like <a href="Buffer_overflow" title="Buffer overflow">buffer-overflow</a> bugs, dangling/wild pointer bugs frequently become security holes. For example, if the pointer is used to make a <a href="Virtual_function" title="Virtual function">virtual function</a> call, a different address (possibly pointing at exploit code) may be called due to the <a href="Vtable" class="mw-redirect" title="Vtable">vtable</a> pointer being overwritten. Alternatively, if the pointer is used for writing to memory, some other data structure may be corrupted. Even if the memory is only read once the pointer becomes dangling, it can lead to information leaks (if interesting data is put in the next structure allocated there) or to <a href="Privilege_escalation" title="Privilege escalation">privilege escalation</a> (if the now-invalid memory is used in security checks). When a dangling pointer is used after it has been freed without allocating a new chunk of memory to it, this becomes known as a "use after free" vulnerability.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> For example, <a href="CVE_(identifier)" class="mw-redirect" title="CVE (identifier)">CVE</a>-<style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><a rel="nofollow" class="external text" href="https://nvd.nist.gov/vuln/detail/CVE-2014-1776">2014-1776</a> is a use-after-free vulnerability in Microsoft Internet Explorer 6 through 11<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> being used by <a href="Zero-day_attack" class="mw-redirect" title="Zero-day attack">zero-day attacks</a> by an <a href="Advanced_persistent_threat" title="Advanced persistent threat">advanced persistent threat</a>.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Avoiding_dangling_pointer_errors">Avoiding dangling pointer errors</h2></div>
<p>In C, the simplest technique is to implement an alternative version of the <code>free()</code> (or alike) function which guarantees the reset of the pointer. However, this technique will not clear other pointer variables which may contain a copy of the pointer.
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="cp">#include</span><span class="w"> </span><span class="cpf"><assert.h></span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span>
<span class="cm">/* Alternative version for 'free()' */</span>
<span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">safefree</span><span class="p">(</span><span class="kt">void</span><span class="w"> </span><span class="o">**</span><span class="n">pp</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="cm">/* in debug mode, abort if pp is NULL */</span>
<span class="w"> </span><span class="n">assert</span><span class="p">(</span><span class="n">pp</span><span class="p">);</span>
<span class="w"> </span><span class="cm">/* free(NULL) works properly, so no check is required besides the assert in debug mode */</span>
<span class="w"> </span><span class="n">free</span><span class="p">(</span><span class="o">*</span><span class="n">pp</span><span class="p">);</span><span class="w"> </span><span class="cm">/* deallocate chunk, note that free(NULL) is valid */</span>
<span class="w"> </span><span class="o">*</span><span class="n">pp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="cm">/* reset original pointer */</span>
<span class="p">}</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p2</span><span class="p">;</span>
<span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">malloc</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span><span class="w"> </span><span class="cm">/* get a chunk */</span>
<span class="w"> </span><span class="n">p2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">;</span><span class="w"> </span><span class="cm">/* copy the pointer */</span>
<span class="w"> </span><span class="cm">/* use the chunk here */</span>
<span class="w"> </span><span class="n">safefree</span><span class="p">((</span><span class="kt">void</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="o">&</span><span class="n">p</span><span class="p">);</span><span class="w"> </span><span class="cm">/* safety freeing; does not affect p2 variable */</span>
<span class="w"> </span><span class="n">safefree</span><span class="p">((</span><span class="kt">void</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="o">&</span><span class="n">p</span><span class="p">);</span><span class="w"> </span><span class="cm">/* this second call won't fail as p is reset to NULL */</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">p2</span><span class="p">;</span><span class="w"> </span><span class="cm">/* p2 is still a dangling pointer, so this is undefined behavior. */</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">c</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>The alternative version can be used even to guarantee the validity of an empty pointer before calling <code>malloc()</code>:
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="n">safefree</span><span class="p">(</span><span class="o">&</span><span class="n">p</span><span class="p">);</span><span class="w"> </span><span class="cm">/* I'm not sure if chunk has been released */</span>
<span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">malloc</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span><span class="w"> </span><span class="cm">/* allocate now */</span>
</pre></div>
<p>These uses can be masked through <code>#define</code> directives to construct useful macros (a common one being <code>#define XFREE(ptr) safefree((void **)&(ptr))</code>), creating something like a metalanguage or can be embedded into a tool library apart. In every case, programmers using this technique should use the safe versions in every instance where <code>free()</code> would be used; failing in doing so leads again to the problem. Also, this solution is limited to the scope of a single program or project, and should be properly documented.
</p><p>Among more structured solutions, a popular technique to avoid dangling pointers in C++ is to use <a href="Smart_pointer" title="Smart pointer">smart pointers</a>. A smart pointer typically uses <a href="Reference_counting" title="Reference counting">reference counting</a> to reclaim objects. Some other techniques include the <a href="Tombstone_(programming)" title="Tombstone (programming)">tombstones</a> method and the <a href="Locks-and-keys" class="mw-redirect" title="Locks-and-keys">locks-and-keys</a> method.<sup id="cite_ref-Fisher_3-1" class="reference"><a href="#cite_note-Fisher-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>Another approach is to use the <a href="Boehm_garbage_collector" title="Boehm garbage collector">Boehm garbage collector</a>, a conservative <a href="Garbage_collection_(computer_science)" title="Garbage collection (computer science)">garbage collector</a> that replaces standard memory allocation functions in C and <a href="C%2B%2B" title="C++">C++</a> with a garbage collector. This approach completely eliminates dangling pointer errors by disabling frees, and reclaiming objects by garbage collection.
</p><p>Another approach is to use a system such as <a href="Capability_Hardware_Enhanced_RISC_Instructions" title="Capability Hardware Enhanced RISC Instructions">CHERI</a>, which stores pointers with additional metadata which may prevent invalid accesses by including lifetime information in pointers. CHERI typically requires support in the CPU to conduct these additional checks.
</p><p>In languages like Java, dangling pointers cannot occur because there is no mechanism to explicitly deallocate memory. Rather, the garbage collector may deallocate memory, but only when the object is no longer reachable from any references.
</p><p>In the language <a href="Rust_(programming_language)" title="Rust (programming language)">Rust</a>, the <a href="Type_system" title="Type system">type system</a> has been extended to include also the variables lifetimes and <a href="Resource_acquisition_is_initialization" title="Resource acquisition is initialization">resource acquisition is initialization</a>. Unless one disables the features of the language, dangling pointers will be caught at compile time and reported as programming errors.
</p>
<div class="mw-heading mw-heading2"><h2 id="Dangling_pointer_detection">Dangling pointer detection</h2></div>
<p>To expose dangling pointer errors, one common programming technique is to set pointers to the <a href="Null_pointer" title="Null pointer">null pointer</a> or to an invalid address once the storage they point to has been released. When the null pointer is dereferenced (in most languages) the program will immediately terminate—there is no potential for data corruption or unpredictable behavior. This makes the underlying programming mistake easier to find and resolve. This technique does not help when there are multiple copies of the pointer.
</p><p>Some debuggers will automatically overwrite and destroy data that has been freed, usually with a specific pattern, such as <code><a href="0xDEADBEEF" class="mw-redirect" title="0xDEADBEEF">0xDEADBEEF</a></code> (Microsoft's Visual C/C++ debugger, for example, uses <code>0xCC</code>, <code>0xCD</code> or <code>0xDD</code> depending on what has been freed<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>). This usually prevents the data from being reused by making it useless and also very prominent (the pattern serves to show the programmer that the memory has already been freed).
</p><p>Tools such as <a href="Polyspace" title="Polyspace">Polyspace</a>, <a href="Rogue_Wave_Software" title="Rogue Wave Software">TotalView</a>, <a href="Valgrind" title="Valgrind">Valgrind</a>, Mudflap,<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> <a href="AddressSanitizer" class="mw-redirect" title="AddressSanitizer">AddressSanitizer</a>, or tools based on <a href="LLVM" title="LLVM">LLVM</a><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> can also be used to detect uses of dangling pointers.
</p><p>Other tools (<a rel="nofollow" class="external text" href="http://www.cis.upenn.edu/acg/softbound/">SoftBound</a>, <a href="Insure%2B%2B" title="Insure++">Insure++</a>, and <a rel="nofollow" class="external text" href="http://www.semanticdesigns.com/Products/MemorySafety">CheckPointer</a>) instrument the source code to collect and track legitimate values for pointers ("metadata") and check each pointer access against the metadata for validity.
</p><p>Another strategy, when suspecting a small set of classes, is to temporarily make all their member functions <a href="Virtual_method" class="mw-redirect" title="Virtual method">virtual</a>: after the class instance has been destructed/freed, its pointer to the <a href="Virtual_method_table" title="Virtual method table">Virtual Method Table</a> is set to <code>NULL</code>, and any call to a member function will crash the program and it will show the guilty code in the debugger.
</p><p>The <a href="AArch64" title="AArch64">ARM64</a> memory tagging extension (MTE) - disabled by default on Linux systems, but can be enabled on <a href="Android_16" title="Android 16">Android 16</a> - triggers a <a href="Segmentation_fault" title="Segmentation fault">segmentation fault</a> when it detects use-after-free and <a href="Buffer_overflow" title="Buffer overflow">buffer overflow</a>.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Common_Vulnerabilities_and_Exposures" title="Common Vulnerabilities and Exposures">Common Vulnerabilities and Exposures</a></li>
<li><a href="Link_rot" title="Link rot">Link rot</a></li>
<li><a href="Memory_debugger" title="Memory debugger">Memory debugger</a></li>
<li><a href="Wild_branch" title="Wild branch">Wild branch</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/Warning-Options.html">"Warning Options - Using the GNU Compiler Collection (GCC)"</a>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text">Gianna Cioni, Antoni Kreczmar, <i>Programmed deallocation without dangling reference</i>, <a href="Information_Processing_Letters" title="Information Processing Letters">Information Processing Letters</a>, v. 18, <b>1984</b>, pp. 179–185</span>
</li>
<li id="cite_note-Fisher-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-Fisher_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Fisher_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">C. N. Fisher, R. J. Leblanc, <i>The implementation of run-time diagnostics in Pascal </i>, <a href="IEEE_Transactions_on_Software_Engineering" title="IEEE Transactions on Software Engineering">IEEE Transactions on Software Engineering</a>, 6(4):313–319, 1980.</span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFDalcianonymous_authorCWE_Content_Team2012" class="citation web cs1">Dalci, Eric; anonymous author; CWE Content Team (May 11, 2012). <a rel="nofollow" class="external text" href="https://cwe.mitre.org/data/definitions/416.html">"CWE-416: Use After Free"</a>. <i>Common Weakness Enumeration</i>. <a href="Mitre_Corporation" title="Mitre Corporation">Mitre Corporation</a><span class="reference-accessdate">. Retrieved <span class="nowrap">April 28,</span> 2014</span>.</cite> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{cite web}}</code>: </span><span class="cs1-visible-error citation-comment"><code class="cs1-code">|author2=</code> has generic name (help)</span></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20170430095220/http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1776">"CVE-2014-1776"</a>. <i>Common Vulnerabilities and Exposures (CVE)</i>. 2014-01-29. Archived from <a rel="nofollow" class="external text" href="https://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1776">the original</a> on 2017-04-30<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-05-16</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFChenCaseldenScott2014" class="citation web cs1">Chen, Xiaobo; Caselden, Dan; Scott, Mike (April 26, 2014). <a rel="nofollow" class="external text" href="http://www.fireeye.com/blog/uncategorized/2014/04/new-zero-day-exploit-targeting-internet-explorer-versions-9-through-11-identified-in-targeted-attacks.html">"New Zero-Day Exploit targeting Internet Explorer Versions 9 through 11 Identified in Targeted Attacks"</a>. <i>FireEye Blog</i>. <a href="FireEye" class="mw-redirect" title="FireEye">FireEye</a><span class="reference-accessdate">. Retrieved <span class="nowrap">April 28,</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://msdn2.microsoft.com/en-us/library/aa270812(VS.60).aspx">Visual C++ 6.0 memory-fill patterns</a></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging">Mudflap Pointer Debugging</a></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text">Dhurjati, D. and Adve, V. <a rel="nofollow" class="external text" href="http://llvm.org/pubs/2006-DSN-DanglingPointers.pdf">Efficiently Detecting All Dangling Pointer Uses in Production Servers</a></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://source.android.com/docs/security/test/memory-safety/arm-mte">"Arm memory tagging extension"</a>. <i>Android Open Source Project</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2025-06-11</span></span>.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite id="CITEREFGoodin2025" class="citation web cs1">Goodin, Dan (2025-05-13). <a rel="nofollow" class="external text" href="https://arstechnica.com/security/2025/05/google-introduces-advanced-protection-mode-for-its-most-at-risk-android-users/">"Google introduces Advanced Protection mode for its most at-risk Android users"</a>. <i>Ars Technica</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2025-06-11</span></span>.</cite></span>
</li>
</ol></div></div>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Memory_management1048" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div id="Memory_management1048" style="font-size:114%;margin:0 4em"><a href="Memory_management" title="Memory management">Memory management</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><a href="Memory_management_(operating_systems)" title="Memory management (operating systems)">Memory management as a function of an operating system</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Hardware</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Memory_management_unit" title="Memory management unit">Memory management unit</a> (MMU)</li>
<li><a href="Translation_lookaside_buffer" title="Translation lookaside buffer">Translation lookaside buffer</a> (TLB)</li>
<li><a href="Input%E2%80%93output_memory_management_unit" title="Input–output memory management unit">Input–output memory management unit</a> (IOMMU)</li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Virtual_memory" title="Virtual memory">Virtual memory</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Demand_paging" title="Demand paging">Demand paging</a></li>
<li><a href="Memory_paging" title="Memory paging">Memory paging</a></li>
<li><a href="Page_table" title="Page table">Page table</a></li>
<li><a href="Virtual_memory_compression" title="Virtual memory compression">Virtual memory compression</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Memory_segmentation" title="Memory segmentation">Segmentation</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Protected_mode" title="Protected mode">Protected mode</a></li>
<li><a href="Real_mode" title="Real mode">Real mode</a></li>
<li><a href="Virtual_8086_mode" title="Virtual 8086 mode">Virtual 8086 mode</a></li>
<li><a href="X86_memory_segmentation" title="X86 memory segmentation">x86 memory segmentation</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Memory_allocator" class="mw-redirect" title="Memory allocator">Allocator</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Dlmalloc" class="mw-redirect" title="Dlmalloc">dlmalloc</a></li>
<li><a href="Hoard_memory_allocator" title="Hoard memory allocator">Hoard</a></li>
<li><a href="Jemalloc" class="mw-redirect" title="Jemalloc">jemalloc</a></li>
<li><a href="Libumem" title="Libumem">libumem</a></li>
<li><a href="Mimalloc" title="Mimalloc">mimalloc</a></li>
<li><a href="Ptmalloc" class="mw-redirect" title="Ptmalloc">ptmalloc</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Manual_memory_management" title="Manual memory management">Manual</a> means</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Static_variable" title="Static variable">Static memory allocation</a></li>
<li><a href="C_dynamic_memory_allocation" title="C dynamic memory allocation">C dynamic memory allocation</a></li>
<li><a href="New_and_delete_(C%2B%2B)" title="New and delete (C++)">new and delete (C++)</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Garbage_collection_(computer_science)" title="Garbage collection (computer science)">Garbage<br>collection</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Automatic_Reference_Counting" title="Automatic Reference Counting">Automatic Reference Counting</a></li>
<li><a href="Boehm_garbage_collector" title="Boehm garbage collector">Boehm garbage collector</a></li>
<li><a href="Cheney's_algorithm" title="Cheney's algorithm">Cheney's algorithm</a></li>
<li><a href="Concurrent_mark_sweep_collector" title="Concurrent mark sweep collector">Concurrent mark sweep collector</a></li>
<li><a href="Finalizer" title="Finalizer">Finalizer</a></li>
<li><a href="Garbage_(computer_science)" title="Garbage (computer science)">Garbage</a></li>
<li><a href="Garbage-first_collector" title="Garbage-first collector">Garbage-first collector</a></li>
<li><a href="Mark%E2%80%93compact_algorithm" title="Mark–compact algorithm">Mark–compact algorithm</a></li>
<li><a href="Reference_counting" title="Reference counting">Reference counting</a></li>
<li><a href="Tracing_garbage_collection" title="Tracing garbage collection">Tracing garbage collection</a></li>
<li><a href="Weak_reference" title="Weak reference">Strong reference</a></li>
<li><a href="Weak_reference" title="Weak reference">Weak reference</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Memory_safety" title="Memory safety">Safety</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Buffer_overflow" title="Buffer overflow">Buffer overflow</a></li>
<li><a href="Buffer_over-read" title="Buffer over-read">Buffer over-read</a></li>
<li><a href="Stack_overflow" title="Stack overflow">Stack overflow</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Issues</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Fragmentation_(computing)" title="Fragmentation (computing)">Fragmentation</a></li>
<li><a href="Memory_leak" title="Memory leak">Memory leak</a></li>
<li><a href="Unreachable_memory" title="Unreachable memory">Unreachable memory</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Automatic_variable" title="Automatic variable">Automatic variable</a></li>
<li><a href="International_Symposium_on_Memory_Management" title="International Symposium on Memory Management">International Symposium on Memory Management</a></li>
<li><a href="Region-based_memory_management" title="Region-based memory management">Region-based memory management</a></li>
<li><a href="Memory_pool" title="Memory pool">Memory pool</a></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> Memory management</li>
<li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> Virtual memory</li>
<li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> Automatic memory management</li>
<li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> Memory management algorithms</li>
<li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> Memory management software</li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-08-01" href="https://en.wikipedia.org/wiki/?title=Dangling_pointer&oldid=1303760219">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>